<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<div class="t_bar">
	1、科技企业孵化器在孵企业一览表
</div>
<table  id="tblAttendOrg1" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead >
		<tr>
			
			<th class="TblHead" align="center" rowspan="2" width="3%">序号</th>
			<th class="TblHead" align="center" rowspan="2" width="10%">企业名称</th>
			<th class="TblHead" align="center" rowspan="2" width="10%">主导产品</th> 
			<th class="TblHead" align="center" rowspan="2" width="10%">技术领域</th> 
			<th class="TblHead" align="center" rowspan="2" width="10%">注册地</th>
			<th class="TblHead" align="center" rowspan="2" width="8%">注册时间</th>
			<th class="TblHead" align="center" rowspan="2" width="8%">进驻时间</th>
			<th class="TblHead" align="center" rowspan="2" width="7%">注册资金（万元）</th>
			<th class="TblHead" align="center" rowspan="2" width="7%">所占孵化场地（平方米）</th>
			<th class="TblHead" align="center" rowspan="2" width="10%">企业负责人<br/>学历</th>
			<th class="TblHead" align="center" colspan="2" width="14%">上年度</th>						
		</tr>
		<tr>
			<th class="TblHead" align="center" width="7%">营业收入(万元)</th>
			<th class="TblHead" align="center" width="7%">年末职工数(人)</th>
		</tr>
	</thead>
	<tbody id="tab">
		
		<c:set value="0" var="index" scope="page"/>
		<x:forEach select="$xmlData/data/milestones/milestone5" var="milestone5">
		
		<c:choose>
			<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
			<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
		</c:choose>
		<tr >
			
			<td align="center">
				<span name="milestones/milestone5[${flag}${index}]@seq_no" ><x:out select="$milestone5/@seq_no"/></span> 
			</td>
			<td align="center">
				<span label="企业名称" name="milestones/milestone5[${flag}${index}]/content1"><x:out select="$milestone5/content1"/></span>
			</td>
			<td align="center">
				<span label="主导产品" name="milestones/milestone5[${flag}${index}]/content2"><x:out select="$milestone5/content2"/></span>
			</td>
			<td align="center">
				<span label="技术领域" name="milestones/milestone5[${flag}${index}]/content3" ><x:out select="$milestone5/content3"/></span>
			</td>
			<td align="center">
				<span label="注册地" name="milestones/milestone5[${flag}${index}]/content4" ><x:out select="$milestone5/content4"/></span>
			</td>
			<td align="center">
				<span  label="注册时间"  name="milestones/milestone5[${flag}${index}]/zhuce_date" ><x:out select="$milestone5/zhuce_date" /></span>
			</td>
			<td align="center">
				<span  label="进驻时间"  name="milestones/milestone5[${flag}${index}]/jinzhu_date" ><x:out select="$milestone5/jinzhu_date" /></span>
			</td>
			<td align="center">
				<span label="注册资金" name="milestones/milestone5[${flag}${index}]/content5" ><x:out select="$milestone5/content5"/></span>
			</td>
			<td align="center">
				<span label="所占孵化场地" name="milestones/milestone5[${flag}${index}]/content6" ><x:out select="$milestone5/content6"/></span>
			</td>
			<td align="center">
				<span label="企业负责人学历" name="milestones/milestone5[${flag}${index}]/educate_name" ><x:out select="$milestone5/educate_name"/></span>
			</td>
			<td align="center">
				<span label="上年度-->营业收入" name="milestones/milestone5[${flag}${index}]/content7" ><x:out select="$milestone5/content7"/></span>
			</td>
			<td align="center">
				<span label="上年度-->年末职工数" name="milestones/milestone5[${flag}${index}]/content8" ><x:out select="$milestone5/content8"/></span>
			</td>
			
		</tr>

		<c:set value="${index+1}" var="index" scope="page"/>
		</x:forEach>
	</tbody>
	<tr>

</table>
<br/>

	


	<br/>
<script type="text/javascript">
$(function() {
	$("#tblMileStones tr:even").addClass("li_1");
	$("#tblMileStones tr:odd").addClass("li_2");
});
$(function() {
	$("#tblMileStones1 tr:even").addClass("li_1");
	$("#tblMileStones1 tr:odd").addClass("li_2");
});

function setRadioSelectedValue(val,targetId,text){
	document.getElementById(targetId+"_name").value = text;
}

function addClass(str,obj){
	   if($(obj).val().trim()!=''){
		   if(str=='attendorg[01]'){
			   $("#attendorg_01").css("display","");
		   }else if(str=='attendorg[00]'){
			   $("#attendorg_00").css("display","");
		   }else{
			   $("#"+str).css("display","");
		   }
		  $("#coopOrgInfo").find("input[name*='"+str+"'],textarea[name*='"+str+"']").addClass("required");
		  $("#coopOrgInfo").find("input[name*='"+str+"'][name$='nature_name']").removeClass("required");
		  $("#coopOrgInfo").find("input[name*='"+str+"'][name$='nature2_name']").removeClass("required");
		  $("#coopOrgInfo").find("input[name*='"+str+"'][name$='work_divide_hidden']").removeClass("required");
	   }else{
		   var flag=false;
		   $("#coopOrgInfo").find("input[name*='"+str+"'],textarea[name*='"+str+"']").each(function(){
			   if($(this).attr("name").indexOf("@seq_no")==-1){
				   if($(this).val().trim()!=''){
					   flag=true;
				   } 
			   }
		   });
		   if(flag){
			   if(str=='attendorg[01]'){
				   $("#attendorg_01").css("display","");
			   }else if(str=='attendorg[00]'){
				   $("#attendorg_00").css("display","");
			   }else{
				   $("#"+str).css("display","");
			   }
			   $("#coopOrgInfo").find("input[name*='"+str+"'],textarea[name*='"+str+"']").removeClass("required");
			   $("#coopOrgInfo").find("input[name*='"+str+"'],textarea[name*='"+str+"']").addClass("required");
			   $("#coopOrgInfo").find("input[name*='"+str+"'][name$='nature_name']").removeClass("required");
			   $("#coopOrgInfo").find("input[name*='"+str+"'][name$='nature2_name']").removeClass("required");
			   $("#coopOrgInfo").find("input[name*='"+str+"'][name$='work_divide_hidden']").removeClass("required");
		   }else{
			   if(str=='attendorg[01]'){
				   $("#attendorg_01").css("display","none");
			   }else if(str=='attendorg[00]'){
				   $("#attendorg_00").css("display","none");
			   }else{
				   $("#"+str).css("display","none");
			   }
			   $("#coopOrgInfo").find("input[name*='"+str+"'],textarea[name*='"+str+"']").removeClass("required");
		   }
	   }
   }
   function deleteSelectedRow2(tableId,message,nummin,warnMsg,selName){
		if(!selName)selName="";
		var tr=$("#"+tableId+" :radio[name*='"+selName+"']:checked").parents("tr");
		if(nummin==null)
			nummin=0;
		var length=tr.length;
		if(tr.length==0)
			tr=$("#"+tableId+" tr").filter(":last");
		else if(tr.length>1)
			tr=tr.first();

		if(tr.get(0).rowIndex-1==nummin){
			scmWarn(irisNotes.delWarn1);
			return false;
		}
		if(length==0){
			
				scmWarn(irisNotes.delWarn2);
			
			return false;
		}
		  if(!confirm(messageTip.deleteTip+message+"？"))
			  return false;
		  tr.remove();
		  refreshRowINdex2(tableId);
		  return true;
	}
   function refreshRowINdex2(tblId){
		 //重新计算行号

		
		  $("#"+tblId+" tr").each(function(){
			  
			   var seq=$(this).get(0).rowIndex;//获得行数
			   if(seq>2){//如果有行  显示时display行不计入类，故只减1
				   
				   seq=seq-2;
				   var seq_no=$(this).find("[name$='seq_no']");
				   if(seq_no.is("span"))
					   seq_no.html(seq);
				   else
					   seq_no.val(seq);
				   
				   seq=""+(seq-1);
				   if(seq.length==1)
					   seq="0"+seq;
				  //替换相应的name参数的seq
				  $(this).find("input,span,textarea,select").each(function(){
					   var name=$(this).attr("name");
					   if(name!=null&&name!=""){
						   name=name.replace(/\[\d*\]/g,"["+seq+"]");
						   $(this).attr("name",name);
					   }
					   var id=$(this).attr("id");
					   if(id!=null&&id!=""){
						   id=id.replace(/\[\d*\]/g,"["+seq+"]");
						   $(this).attr("id",id);
						   id=id.replace(/\d+/g,""+seq+"");
						   $(this).attr("id",id);
					   }
					   var className=$(this).attr("class");
					   if(className!=null&&className!=""){
						   className=className.replace(/\[\d*\]/g,"["+seq+"]");
						   $(this).attr("class",className);
					   }
				   });
			   }
			 }
		  );

	}
   /**
    * 上移行
    * @param tblId
    * @returns {Boolean}
    */
   function movePrev2(tblId,selName) {

   	if (!selName)
   		selName = "";
   	if ($("#" + tblId + " :radio[name*='" + selName + "']:checked").length == 0) {
   		scmWarn(irisNotes.prevWarn);
   		return false;
   	}
   	if ($("#" + tblId + " tr").length <= 3)
   		return false;
   	var trChecked = $("#" + tblId + " :radio[name*='" + selName + "']:checked")
   			.parents("tr").first();// 取得被选中的行
   	var trPrev = trChecked.prev();// 取得上一行
   	var index = trChecked.get(0).rowIndex;// 获得行号
   	if (index <= 3) {// 如果是第一行
   		scmWarn(irisNotes.tabelMoveWarn1);
   		return false;
   	}
   	//trChecked.remove();
   	trPrev.before(trChecked);
   	trChecked.find(":radio[name*='" + selName + "']").attr("checked", 'true');
   	refreshRowINdex2(tblId);
   }

   /**
    * 下移行
    * @param tblId
    * @returns {Boolean}
    */
   function moveNext2(tblId,selName) {
   	if (!selName)
   		selName = "";
   	if ($("#" + tblId + " :radio[name*='" + selName + "']:checked").length == 0) {
   		scmWarn(irisNotes.nextWarn);
   		return false;
   	}
   	if ($("#" + tblId + " tr").length <= 3) {
   		return false;
   	}
   	var trChecked = $("#" + tblId + " :radio[name*='" + selName + "']:checked")
   			.parents("tr").first();// 取得被选中的行
   	var trNext = trChecked.next();
   	var index = trChecked.get(0).rowIndex;// 获得行号
   	if (index == $("#" + tblId + " tr").length - 1) {// 如果是第一行
   		scmWarn(irisNotes.tabelMoveWarn2);
   		return false;
   	}
   	//trChecked.remove();
   	trNext.after(trChecked);
   	trChecked.find(":radio[name*='" + selName + "']").attr("checked", "true");
   	refreshRowINdex2(tblId);
   }



</script>